package com.prizedraw.prize_draw.common.sheet;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 创建自定义上传实体类，好封装些，以免改来改去
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UserUpLoad extends BaseRowModel implements Serializable {

    @ExcelProperty(value = "员工名称", index = 0)
    private String userName;

    @ExcelProperty(value = "性别", index = 1)
    private String gender;

    @ExcelProperty(value = "手机号码", index = 2)
    private String phoneNum;

    @ExcelProperty(value = "部门名称", index = 3)
    private String deptName;

    @ExcelProperty(value = "聘用日期", index = 4)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date hiredate;
}
